function s = calculateSVD2D( H, n, precision)
    L=3*n-2;
    Hhat=fftn(H.filter,[L,L]);
    X0=zeros(L,L,precision);
    e0=zeros(n,n,precision);
    T=zeros(n^2,n^2,precision);
    for i = 1:n^2
            e1=e0;
            e1(i)=1;
            Xhat=X0;
            Xhat(1:n,1:n)=e1;
            Xhat=fftn(Xhat);
            Xhat=ifftn(Xhat.*Hhat);
            e1=Xhat(n:2*n-1,n:2*n-1);
            T(i,:)=e1(:); %symmetric operator
    end
    if 0
        try
            sbig=svds(T,1);
        catch err
            err.identifier
            sbig=Inf;
        end
        try
            ssmall=svds(T,1,0);
        catch err
            err.identifier
            ssmall=0;
        end
    end
    s=svd(T);
    %conditionNumber=sbig/ssmall;
end
